package service

import (
	"blog/config"

	"github.com/gin-gonic/gin"
)

func CommonIndex() {

}

func CommonCJsonReply(c *gin.Context, code int, obj any) {
	c.JSON(code, gin.H{
		config.ResCode: code,
		config.ResMsg:  config.GetErrMsg(code),
		config.ResData: obj,
	})
}

func Hello(c *gin.Context) {
	CommonCJsonReply(c, config.SUCCESS, "Hello World")
}
